import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// ---
import axios from 'axios'
import './plugins/element'
import './assets/css/global.less'
import MyPlugin from '@plugins/MyPlugin'
import { initSiren } from './utils/siren'

Vue.use(MyPlugin)
Vue.config.productionTip = false
Vue.prototype.$http = axios

const errorHandler = (err, vm, info) => {
  // handle error
  // `info` 是 Vue 特定的错误信息，比如错误所在的生命周期钩子
  // 只在 2.2.0+ 可用
  console.log('err', err.message);
  initSiren(err, vm, info, {
    sirenUUid: 'Z7VeXVKAv'
  })
}
Vue.config.errorHandler = errorHandler
new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
